package com.programmercarl.string;

import java.util.Scanner;

/**
 * https://kamacoder.com/problempage.php?pid=1065
 *
 * @author yulongtian
 * @create 2024-12-15 12:46
 */
public class Test05 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int k = Integer.parseInt(sc.nextLine());
        String s = sc.nextLine();
        StringBuilder sb = new StringBuilder(s.length());
        for (int i = 0; i < k; i++) {
            sb.append(s.charAt(s.length() - k + i));
        }
        for (int i = 0; i < s.length() - k; i++) {
            sb.append(s.charAt(i));
        }
        sc.close();
        System.out.println(sb);
    }
}
